import { defineComponent, ref, h, Fragment } from 'vue'
import { fetchDemo } from '../api/index'

const Demo = defineComponent({
  name: 'jsxdemo',
  setup (props) {
    const input = ref(null)

    const click = (e) => {
      console.log(e)
      console.log(input.value)
    }

    const data = ref('')

    fetchDemo().then((res)=>{
        data.value = res
        console.log(data.value)
    })

    return {
      click,
      input, data
    }
  },
  render () {
    return (this.data)
  }

})

export default Demo
